<template>
  <div>
    <!-- <div class="strategyFatherBox">
      <el-button type="primary" icon="el-icon-upload" size='small' @click="uploadFile">{{$t('上传文件')}}</el-button>
      <el-button type="success" size='small' @click="uploadSystem">{{$t('升级')}}</el-button>
    </div> -->
    <el-table size='mini' ref="multipleTable" :data="updateInfo" tooltip-effect="dark">
      <el-table-column prop="name" align='center' :label="$t('名称')" min-width="200"></el-table-column>
      <el-table-column prop="version" align='center' :label="$t('版本')" min-width="200"></el-table-column>
      <el-table-column prop="date" align='center' :label="$t('更新时间')" min-width="200"></el-table-column>
    </el-table>
    <!-- <upload-file v-if="uploadFileVisible" ref="refUploadFileVisible"></upload-file> -->
    <!-- <upload-system v-if="uploadSystemVisible" ref="refUploadSystemVisible"></upload-system> -->
  </div>
</template>
<script>
import { getUpdateInfo } from '@/api/system/update'
// import uploadFile from './components/uploadFile'
// import uploadSystem from './components/uploadSystem.vue'
export default {
  // components: { uploadFile, uploadSystem },
  name: 'Version',
  data () {
    return {
      // uploadFileVisible: false,
      // uploadSystemVisible: false,
      updateInfo: []
    }
  },
  mounted () {
    this.listData()
  },
  methods: {
    // uploadFile () {
    //   this.uploadFileVisible = true
    //   this.$nextTick(() => {
    //     this.$refs.refUploadFileVisible.init()
    //   })
    // },
    // uploadSystem () {
    //   this.uploadSystemVisible = true
    //   this.$nextTick(() => {
    //     this.$refs.refUploadSystemVisible.init()
    //   })
    // },
    // 列表
    listData () {
      getUpdateInfo().then(res => {
        if (res.status === 0) {
          this.updateInfo = res.info
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.upgradeButton {
  color: #409eff;
}
</style>
